<?php

namespace App\Http\Controllers;

use App\Models\PolicyFile;
use App\Models\PolicyInterpretation;
use App\Models\PolicySupport;
use Illuminate\Http\Request;

class PolicyServiceController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $supports = PolicySupport::paginate(10);
        return view('policy-service.app', compact('supports'));
    }

    public function index_file ()
    {
        $supports = PolicyFile::paginate(10);
        return view('policy-service.file', compact('supports'));
    }

    public function index_interpretation ()
    {
        $supports = PolicyInterpretation::paginate(10);
        return view('policy-service.jiedu', compact('supports'));
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        //
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        $data = PolicySupport::find($id);
        return view('policy-service.detail', compact('data'));
    }

    public function show_file($id)
    {
        $data = PolicyFile::find($id);
        return view('policy-service.file_detail', compact('data'));
    }

    public function show_jiedu($id)
    {
        $data = PolicyInterpretation::find($id);
        return view('policy-service.jiedu_detail', compact('data'));
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function edit($id)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, $id)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
        //
    }
}
